package s12.ch14.ex1;

public class MyExceptions {

	public static void main(String[] args) {
		Car car = null;

		try {
			doSomething(car);
		} catch (Exception e) {

			e.printStackTrace();

			System.out.println("after cautching an nullPointerExeption");
		} catch (NullPointerException e) {
			System.out.println("After cauthing an Exeptions");
		}
		System.out.println("print my please");
	}

	private static void doSomething(Car car) {
		doSomethingElse(car);
		System.out.println(car.toString());
		System.out.println("from inside doSomething");

	}

	private static void doSomethingElse(Car car) {
//		System.out.println(3 / 0);
		System.out.println(car.toString());

	}

}
